from rest_framework.serializers import ModelSerializer
from goods.models import Carousel,Goods,Category
class CarouselSer(ModelSerializer):
    class Meta:
        model = Carousel
        fields = "__all__"

class CateorySer(ModelSerializer):
    class Meta:
        model = Category
        fields = "__all__"

class GoodsSer(ModelSerializer):
    cate = CarouselSer(read_only=True)
    class Meta:
        model = Goods
        fields = "__all__"
        read_only_fields = ["price","selling_price"]

